package mathe;

public class Aufgabe
{
  public static void main(String[] args)
  {
    double xn = 0.5;
    double L = 1./4;
    double x7 = 0;
    double x8 = 0;
    for(int i = 0; i<8; i++)
    {
      xn = 1./Math.sqrt(xn+2);
      String index = ""+(i+1);
      System.out.println("x"+index+" = "+xn);
      if(i==6)
        x7 = xn;
      else if(i==7)
        x8 = xn;
    }
    double fehler = L/(1-L)*Math.abs(x8-x7);
    System.out.println(fehler);
  }
}